//
//  XJCommentMsgModel.m
//  XinJiangMall
//
//  Created by RaoBo on 2018/7/2.
//  Copyright © 2018年 Tzyang. All rights reserved.
//

#import "XJCommentMsgModel.h"

@implementation XJCommentMsgModel


#pragma mark - getter
- (NSInteger)cellHeight {
    
    if (_cellHeight == 0) {
        _cellHeight = 30; //间距 5 * 5个
        
        //div1高度 : 50
        //中间label高度 40
        
        //div2 动态计算
        CGFloat textW = KWidth - (15+10+10);
        
        NSString *textStr = [NSString stringWithFormat:@"%@  %@",self.reply_nickname,self.publish_text];
        
        CGFloat textH = [textStr boundingRectWithSize:CGSizeMake(textW, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:20.0]} context:nil].size.height;
        
        _cellHeight += 50 + 40 + textH;
    }
    
    return _cellHeight;
}


@end
